package com.paradogs.gs.modules.task.condition;

import com.paradogs.gs.modules.GameObject;
import lombok.Data;

/**
 * @author: yumi
 * @date: 2024/12/31  17:40
 * @Description: TODO
 */
@Data
public abstract class TaskCondition {

    protected Integer cfgId;
    protected Integer[] parameters;
    protected Integer progress;

    public TaskCondition(Integer cfgId, Integer[] parameters) {
        this.cfgId = cfgId;
        this.parameters = parameters;
    }

    public void onInitialization(GameObject owner) {
        this.progress = 0;
    }
//    public abstract void onStart(GameObject owner);
    public void onChange(GameObject owner, int val) {
        this.progress += val;
    }
    public abstract boolean isComplete();

}
